#ifndef CUBE_H
#define CUBE_H

#include "Export.h"
#include "IDrawable.h"
#include "Color4.h"
#include <iostream>
#include <stdio.h>
#include <SDL/SDL.h>
#include <GL/gl.h>

namespace glow{

// le cube est un descendant de IDrawable , il doit donc implémenter la fonction draw
  
  class SHARED Cube : public IDrawable
  {
  private : 
    float _side;
    Color4f _color;
    //Texture _texture;
    float _coord[3];
    bool _solidMode;
    float _vertices[8];
    unsigned char _index[24];
    
  public :
  Cube(float s=1.,Color4f c/* Texture t*/, float co[3]={0,0,0} ,bool sld=false):_side(s),_color(c)/*_texture(t)*/,_coord(co),_solidMode(sld){
     
    }
    

    ~Cube();
    
    void draw();
    
    Color4f getColor()const  { return _color;  }
     
    Texture getTexture()const{ return _texture;}
    
    bool getSolidMode()const { return _solidMode; }

    void setColor(Color4f c)
    {
      _color=c;
    }
    
    void setSide(float s)
    {
      _side=s;
    }
    
    void setPosition(float x, float y, float z)
    {
      _coord[0]=x;
      _coord[1]=y;
      _coord[2]=z;
    }
    
    
    
    
    
  };
}
#endif
